<?php 

function sidebar($pos){
	if ($pos == "left")
	{
		include "../widgets/vmenu.php";	
		include "../widgets/ads.php";	
	}
	else
	{
		include "../widgets/right.php";
	}
}

function format_ten_san_pham($ten, $so_ki_tu) {
	if (mb_strlen($ten) <= $so_ki_tu) return $ten;
	return mb_substr($ten, 0, $so_ki_tu - 3, 'utf8')."...";		
}


function tach_ngay($yymmdd) {
	$ngay= $yymmdd;
	$ngay_tao = date ('d-m-Y', strtotime($ngay));
	return $ngay_tao;
}
?>